<template>
	<view class="">
		<!-- 头部 -->
		<view class="header_bar header_fixed header_main">
			<view class="header">
				<view class="header-goBack" @click="$tools.back(1)"></view>
				<view class="header-title"></view>
			</view> 
		</view> 
		
		<view class="inDetails">
			<view class="inDetails-title">{{ contract.remark }}</view>
			<view class="inDetails-time">
				<view class="times">{{ contract.createTime }}</view>
			</view>
			
			<!--  v-html="newsContent" @tap.stop="getCopyUrl()" ref="richContent" -->
			<view class="inDetails-content">
				<rich-text :nodes="newsContent" 
				class="textImage" style="color:#000000;font-size: 34rpx;font-weight: 400;line-height: 56rpx;"></rich-text>
			</view>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		components:{
		},
		data(){
			return{
				id: '',
				contract: {
					// noticeTitle: '嗖嗖商城最新公告',
					// createTime: '2024-04-10 15:20:00'
				},
				newsContent: '',
				imgPath: [],
			}
		},
		onLoad(option) {
			this.noticeId = option.value1;
		},
		onShow() {
			this.init();
		},
		methods: {
			init() {
				this.getContract();
			},
			getContract() {
				var data = {};
				data['type'] = this.noticeId;
				console.log("data：",data);
				this.$Ajax('/api/notice/getContract',data,res => {
						if (res.code == 200) {
							if(res.data){
								this.contract = res.data;
								this.newsContent = res.data.content.replace(/<img/g, "<img style='width:100%;margin: 15px 0;'").replace(/<a/g, "<a style='color: #127FF6'");
							}
						}	
					}, err => {
						
					}, 'GET' , false
				)
			},
		}
	}
</script>

<style lang="scss" scoped>
	
</style>